package com.eyet.comeon.welcome;

import com.eyet.comeon.R;
import com.eyet.comeon.data.ActionIntent;
import com.eyet.comeon.net.Net;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

public class WelcomeActivity extends Activity {

	private final int DELAYED_LENGTH = 1000;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.welcome);
		new Handler().postDelayed(new Runnable(){
			public void run() {
				if(Net.testConnectivity(WelcomeActivity.this)){
					Intent intent = new Intent(ActionIntent.ACTION_MAIN);
					startActivity(intent);
					WelcomeActivity.this.finish();
				}
			}
		}, WelcomeActivity.this.DELAYED_LENGTH);
	}
}